@model Wiwi.ViewModels.ProfileView 
@{
    Layout = "~/Views/Shared/_Layout-frontPage.cshtml";
    ViewBag.Title = "WiWi NZ";
    var HomeDir = System.Configuration.ConfigurationManager.AppSettings["HomeDirectory"].ToString(); 
}
 
<script type="text/javascript" >
    var currentTime = new Date()
    var month = currentTime.getMonth() + 1
    var lastdate = month + "," + currentTime.getDate() + "," + currentTime.getFullYear() + "," + currentTime.getHours() + "," + currentTime.getMinutes() + "," + currentTime.getSeconds();
    $(document).ready(function () {
        $('#btnTopCounter').hide();
        UpdateData();
    });

    function UpdateData() {
        $.ajax({
            url: "/Home/TopWantsCount",
            dataType: 'json',
            type: 'GET',
            data: 'DT=' + lastdate,
            contentType: 'application/json; charset=utf-8',
            processData: true,
            success: function (data) {
                if (data > 0) {
                    var currentFunc = new Date()
                    var monthFunc = currentFunc.getMonth() + 1
                    lastdate = monthFunc + "," + currentFunc.getDate() + "," + currentFunc.getFullYear() + "," + currentFunc.getHours() + "," + currentFunc.getMinutes() + "," + currentFunc.getSeconds();
                    $('#btnTopCounter').val(data.toString() + " new Wants");
                    $('#btnTopCounter').show();
                }
                else {
                    $('#btnTopCounter').hide();
                }
            }
        });
        setTimeout("UpdateData()", 15000);
    }
    //  ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    eval(function (p, a, c, k, e, r) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] } ]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('7 j=x y();A.B.q({C:5(a){7 b={r:\'1\',9:\'D\',8:E};7 a=$.q(b,a);7 c="#"+$(0).F("G");7 d=s($(0).k("H"))-I;7 e=s($(0).k("J"))-K;7 f=\'\';$(0).k("L-M","N");$(c).g().h(5(i){$(0).k({"z-O":i,"P":"Q"})});$(c).g().h(5(){$(0).l({m:((2.1()*R)+4)+"3","n":(2.1()*e)+"3","o":(2.1()*d)+"3"},a.8,a.9)});$(0).S(5(){$(0).T();U(j[c])});V(a.r){t\'W\':{f=\'$("\'+c+\'").g().h(5(){$(0).l({m: ((2.1()*p)+6)+"3", "n": (2.1()*\'+e+\')+"3"}, \'+a.8+\', "\'+a.9+\'" );});\';u}t\'X\':{f=\'$("\'+c+\'").g().h(5(){$(0).l({m: ((2.1()*p)+6)+"3", "o":(2.1()*\'+d+\')+"3"}, \'+a.8+\', "\'+a.9+\'" );});\';u}Y:{f=\'$("\'+c+\'").g().h(5(){$(0).l({m: ((2.1()*p)+6)+"3", "n": (2.1()*\'+e+\')+"3", "o":(2.1()*\'+d+\')+"3"}, \'+a.8+\', "\'+a.9+\'" );});\'}}j[c]=v(f,a.8+w);$(0).Z(5(){j[c]=v(f,a.8+w)})}});', 62, 62, 'this|random|Math|px||function||var|speed|easein|||||||children|each||tcTimer|css|animate|fontSize|top|left|34|extend|direction|parseInt|case|break|setInterval|50|new|Array||jQuery|fn|tagCloud|linear|3000|attr|id|width|70|height|30|list|style|none|index|position|absolute|36|mouseover|stop|clearInterval|switch|vertical|horizontal|default|mouseout'.split('|'), 0, {}))

    $(function () {
        $('#DivTagCloud').tagCloud();
    });

</script>
<!-- Tag Cloud -->

<div class="grid_16 hideOverflow" id="wiwi-tag-cloud">

	<p>
    @foreach (var tg in Model.Cloud)
    {
        if (tg.Scrore > 99)
        {
            @Html.ActionLink(tg.keyword, "KeyWordWants", "Home", new { KeyWordID = tg.KeywordID }, new { @class = "xl" })
        }
        else if (tg.Scrore > 69)
        {
            @Html.ActionLink(tg.keyword, "KeyWordWants", "Home", new { KeyWordID = tg.KeywordID }, new { @class = "l" })
        }
        else if (tg.Scrore > 39)
        {
            @Html.ActionLink(tg.keyword, "KeyWordWants", "Home", new { KeyWordID = tg.KeywordID }, new { @class = "m" })
        }
        else if (tg.Scrore > 19)
        {
            @Html.ActionLink(tg.keyword, "KeyWordWants", "Home", new { KeyWordID = tg.KeywordID }, new { @class = "s" })
        }
        else if (tg.Scrore > 9)
        {
            @Html.ActionLink(tg.keyword, "KeyWordWants", "Home", new { KeyWordID = tg.KeywordID }, new { @class = "xs" })
        }
    } 
	</p>

</div>	

<div class="clear"></div>

<div class="grid_8 box-shadow" id="wiwi-top-wants">
    
     <h4 class="tabbed">Top wants</h4>
     <div id="DivTopCounter">
     @using (Html.BeginForm("Index", "Home"))
     {
        <input type ="submit" id="btnTopCounter" value="tst" />
     }
    </div>
      @foreach (var wnt in Model.Want)
      {      
          @Html.Partial("~/Views/Shared/_WantControl.cshtml", wnt)
        
	<hr />   
      }
      <p>
    @Html.ActionLink("View More Recent", "MoreRecent", "Home", new { pagecnt = 1 }, new { @class="grey-button button-m center" })
    </p>
</div>

    <div class="grid_8 box-shadow" id="wiwi-recent-wants">
    	<h4 class="tabbed xWide">Recently wanted</h4>
        @foreach (var pop in Model.WantPopular)
      {      
          @Html.Partial("~/Views/Shared/_WantControl.cshtml", pop)
        
	<hr />   
      }
	</div>    


    